package club.banyuan.demo.animal;

/**
 * @author edz
 * @version 1.0
 * @date 2020/11/24 下午7:19
 */
public class AnimalDemo {
    public static void main(String[] args) {
        Cat c1 = new Cat();
        c1.setAge(5);
        c1.setName("加菲猫");
        System.out.println(c1.getAge()+","+c1.getName());
        c1.catchMouse();

        Cat c2=new Cat("布偶猫",1);
        System.out.println(c2.getAge()+","+c2.getName());
        c2.catchMouse();

        Dog d1=new Dog();
        d1.setAge(2);
        d1.setName("藏獒");
        System.out.println(d1.getAge()+","+d1.getName());
        d1.lookDoor();

        Dog d2=new Dog("边牧",3);
        System.out.println(d2.getAge()+","+d2.getName());
        d2.lookDoor();

    }
}
